package com.starbaba.weixin.model;

import com.base.common.reflection.annotations.g3db_alias;
import com.base.common.reflection.annotations.g3db_ignore;

import java.io.Serializable;

/**
 * @author Yukinomiu
 * @version 1.0
 */
@g3db_alias("weixin_menu_item")
public final class WeixinMenu implements Serializable {
    @g3db_ignore
    private static final long serialVersionUID = 2833093222080750006L;

    @g3db_ignore
    public static final int MENU_ROLE_SINGLE = 0;
    @g3db_ignore
    public static final int MENU_ROLE_COMBINE = 1;

    @g3db_ignore
    public static final int ACTION_TYPE_VIEW = 0;
    @g3db_ignore
    public static final int ACTION_TYPE_CLICK = 1;
    @g3db_ignore
    public static final int ACTION_TYPE_UNKNOWN = -1;

    @g3db_alias("id")
    private Long id;
    @g3db_alias("rootid")
    private Long rootId;
    @g3db_alias("idx")
    private Integer index;

    @g3db_alias("menurole")
    private Integer menuRole;
    @g3db_alias("displayname")
    private String displayName;
    @g3db_alias("parentid")
    private Long parentId;

    @g3db_alias("actiontype")
    private Integer actionType;
    @g3db_alias("actionparam")
    private String actionParam;

    public WeixinMenu() {
    }

    public WeixinMenu(Long id, Long rootId, Integer index, Integer menuRole, String displayName, Long parentId, Integer actionType, String actionParam) {
        this.id = id;
        this.rootId = rootId;
        this.index = index;
        this.menuRole = menuRole;
        this.displayName = displayName;
        this.parentId = parentId;
        this.actionType = actionType;
        this.actionParam = actionParam;
    }

    @Override
    public String toString() {
        return "WeixinMenu{" +
                "id=" + id +
                ", rootId=" + rootId +
                ", index=" + index +
                ", menuRole=" + menuRole +
                ", displayName='" + displayName + '\'' +
                ", parentId=" + parentId +
                ", actionType=" + actionType +
                ", actionParam='" + actionParam + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public WeixinMenu setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getRootId() {
        return rootId;
    }

    public WeixinMenu setRootId(Long rootId) {
        this.rootId = rootId;
        return this;
    }

    public Integer getIndex() {
        return index;
    }

    public WeixinMenu setIndex(Integer index) {
        this.index = index;
        return this;
    }

    public Integer getMenuRole() {
        return menuRole;
    }

    public WeixinMenu setMenuRole(Integer menuRole) {
        this.menuRole = menuRole;
        return this;
    }

    public String getDisplayName() {
        return displayName;
    }

    public WeixinMenu setDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    public Long getParentId() {
        return parentId;
    }

    public WeixinMenu setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public Integer getActionType() {
        return actionType;
    }

    public WeixinMenu setActionType(Integer actionType) {
        this.actionType = actionType;
        return this;
    }

    public String getActionParam() {
        return actionParam;
    }

    public WeixinMenu setActionParam(String actionParam) {
        this.actionParam = actionParam;
        return this;
    }
}
